﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_AddMusic.aspx.cs" Inherits="Master_Admin_AddMusic" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="Css/Css.css" rel="stylesheet" type="text/css" />
    <script src="../Script/popup.js"></script>
    <link href="Css/Css.css" rel="stylesheet" type="text/css" />
    <link href="../Css/ColorPicker.css" rel="stylesheet" type="text/css" />   
    <link href="../Script/formValidator/style/validator.css" rel="stylesheet" type="text/css" />
    <script src="../Script/jquery.js" type="text/javascript"></script>
    <script src="../Script/ColorPicker.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../Css/Users.css" />
    <link href="../Script/formValidator/style/validator.css" rel="stylesheet" type="text/css" />
    <script src="../Script/formValidator/jquery_last.js" type="text/javascript"></script>
    <script src="../Script/formValidator/formValidator.js" type="text/javascript"></script>
    <script src="../Script/formValidator/formValidatorRegex.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
        $.formValidator.initConfig({ alertmessage: false, formid: "Form1", onerror: function(msg) { alert(msg) } });
        $("#txtMusicName").formValidator({ tipid: "txtTipMusicName", onshow: "请输入音乐名称", onfocus: "音乐名称不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 40, empty: { leftempty: false, rightempty: false, emptyerror: "音乐名称两边不能有空符号" }, onerror: "音乐名称长度必须在1-40位,请确认" });
        $("#Txt_PicName").formValidator({ tipid: "TxtTitle_PicName", onshow: "请输入音乐地址", onfocus: "音乐地址不能为空", oncorrect: "输入正确" }).inputValidator({  min: 1, max: 300, empty: { leftempty: false, rightempty: false, emptyerror: "音乐地址两边不能有空符号" }, onerror: "音乐地址不能为空,请确认" });
        });
    </script>
    <script type="text/javascript">
        function MusicTypeChange(va)
        {
            var btnMusicType=document.getElementById("btnMusicType");
            switch(va)
            {
                case "0":
                btnMusicType.style.display="block";
                break;
                case "1":
                btnMusicType.style.display="none";
                break;
            }
        }
    </script>
</head>
<body>
    <form id="Form1" runat="server">
    <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align="center">
        <tr>
            <td colspan="2" align="center" class="title">
                <strong>音 乐 管 理</strong>
            </td>
        </tr>
        <tr class="tdbg">
            <td width="70" height="30">
                <strong>管理导航：</strong>
            </td>
            <td height="30">
                <a href="Admin_AddMusic.aspx">添加音乐</a>&nbsp;|&nbsp;<a href="Admin_ManageMusic.aspx">所有音乐</a>
            </td>
        </tr>
    </table>
      
    <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align=center>
            <tr>
                <td colspan="2" align="center" class="title">
                    <strong>
                        添加音乐</strong>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>音乐名称：</strong>
                </td>
                <td height="25">
                    <asp:TextBox runat="server" ID="txtMusicName" /><div id="txtTipMusicName"></div>
                </td>
            </tr>
            
            <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>地址：</strong></td>
                <td height="25">
                    <asp:TextBox ID="Txt_PicName" runat="server" Width="192px"></asp:TextBox>&nbsp;
                    <input  Style="cursor: hand; background-color: #cccccc; height: 20px;"  type="button" id="btnMusicType" value="从已有的中选择" onclick="javascript:wy_addPhotoCat('../App/SelectMusicList.aspx?inputobj=Txt_PicName','添加音乐',500,200)" />
                    <select name="selType" id="selType" onchange="MusicTypeChange(this.value)">
                        <option value="0" <%=SelMusicType %> >从已有的中选择</option>
                        <option value="1" <%=InputMusicType %> >输入url</option>
                    </select>
                    <div id="TxtTitle_PicName"></div>
                </td>
            </tr>            
            
            <tr class="tdbg">
                <td height="40" colspan="2" align="center">
                    <input name="Action" type="hidden" id="Action" value="SaveModify">
                    <asp:Button  ID="btnSubmit" runat="server" 
                        Style="cursor: hand; background-color: #cccccc; height: 20px;" 
                        Text="  确     定  " onclick="btnSubmit_Click" />&nbsp;
                       <asp:Button  ID="Button1" runat="server" 
                        Style="cursor: hand; background-color: #cccccc; height: 20px;" 
                        Text="  修     改  " Visible="false" onclick="Button1_Click" />
                    
                    
                    
                </td>
            </tr>
        </table>  
    </form>
</body>
</html>

